class CreateAdminUsers < ActiveRecord::Migration
  def self.up
    create_table (:admin_users,:options=>'ENGINE=InnoDB DEFAULT CHARSET=utf8',:force => true) do |t|
			t.string :user_name, :null => false, :limit => 20
			t.string :real_name, :null => false, :limit => 20
			t.string :email, :limit => 20
			t.string :crypted_password, :null => false, :limit => 50
			t.string :salt, :null => false, :limit => 50
			t.integer :status, :limit => 1, :default => 0
			t.text :remarks
			t.integer :flag, :limit => 4, :default => 0
      t.timestamps
    end
    add_index :admin_users, :user_name, :unique => true
  end

  def self.down
    drop_table :admin_users
    remove_index :admin_users, :user_name
  end
end
